package com.zyn.es.basic;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.action.delete.DeleteResponse;

public class DeleteAPI extends EsClient {

    Logger log = LogManager.getLogger();

    public static void main(String[] args) {
        new DeleteAPI().delete();
    }

    public void delete() {
        super.initClient();
        log.info("================================");
        DeleteResponse response = client.prepareDelete(INDEX, TYPE, "1").get();
        super.printResponse(response);
        client.close();
        log.info("================================");
    }
}
